﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Models;
using System.Threading.Tasks;
using System.Linq;
using System.Security.Claims;
using IRepository;
using System;
using Helper;
using Microsoft.AspNetCore.Cors;
using Models.Entity;

namespace course.Controllers
{
    /// <summary>
    /// 
    /// </summary>
    [Route("[controller]/[action]")]
    [ApiController]
    [EnableCors]
    [Authorize]
    public class ReportController : ControllerBase
    {
        IReportRepository _respoitory;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Role"></param>
        public ReportController(IReportRepository Role)
        {
            this._respoitory = Role;
        }


        /// <summary>
        /// 教师课时明细
        /// </summary>
        /// <param name="inEnt"></param>
        /// <returns></returns>
        [HttpPost]
        public Task<ResultObj<ResultTeacherReport>> TeacherCourseReport(DtoTeachReport inEnt)
        {
            return _respoitory.TeacherCourseReport(inEnt);
        }

        /// <summary>
        /// 教师课时汇总
        /// </summary>
        /// <param name="inEnt"></param>
        /// <returns></returns>
        [HttpPost]
        public Task<ResultObj<TeachWeekReport>> TeacherAllCourseReport(DtoTeachReport inEnt){
            return _respoitory.TeacherAllCourseReport(inEnt);
        }
    }
}